package com.youkeyi.ddy.cloud.common.api.basic.pub.server;

import com.youkeyi.ddy.cloud.common.api.basic.pub.server.dto.PublicServerListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.server.dto.PublicServerTreeItemCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.server.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * PublicServerCloudServiceFallback
 *
 * @Author liuxiawang
 * @Date 2024/2/20 4:28 PM
 * @Location shenzhen.china
 */
@Slf4j
@Component
@RequestMapping("/public/server/fallback")
public class PublicServerCloudServiceFallback implements PublicServerCloudService {

    @Override
    public PublicServerListCloudDto query(PublicServerQueryCloudParam param) {
        return new PublicServerListCloudDto(Boolean.FALSE, "服务不可用");
    }

    @Override
    public List<PublicServerTreeItemCloudDto> queryTree(PublicServerQueryTreeCloudParam param) {
        log.error("服务不可用");
        return new ArrayList<>();
    }

    @Override
    public ResponseContent create(PublicServerCreateCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent update(PublicServerUpdateCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent delete(PublicServerDeleteCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }
}
